import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import Welcome from '../views/Welcome.vue'
import Users from '../views/user/Users.vue'
import Report from '../views/report/Report.vue'
import GoodList from '../views/goods/List.vue'
import Order from '../views/order/order.vue'
import Add from '../views/goods/Add.vue'
import '../assets/total.css'



Vue.use(Router)


const router = new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes : [
    {
      path:'/',
      redirect:'/home'
    },
    {
      path: '/login',
      component: Login
    },
    
    {
      path:'/home',
      component: Home,
      redirect:'/welcome',
      children:[{path: '/welcome',component: Welcome},
      {path:'/users',component:Users},
      {path:'/reports',component:Report},
      {path:'/goods',component:GoodList},
      {path:'/orders',component:Order},
      {path:'/goods/add',component:Add}
    
    ]
    }
  ]
})



export default router
